if __name__ == '__main__':
    # 递归算法_han诺塔TowerofHanoi.py
    def hanoi(n, a, b, c):
        # 基线条件
        if n == 1:
            print(a, '-->', c)
        # 递归条件
        else:
            hanoi(n - 1, a, c, b)
            print(a, '-->', c)
            hanoi(n - 1, b, a, c)
    hanoi(3, 'A', 'B', 'C')
    print("递归算法_汉诺塔TowerofHanoi.py")